var cut[Ncat-1];

model {
  for (i in 1:N){
    y[i] ~ dnorm(mu[i], 1)
    mu[i] <- b.county[countyID[i]] + b.1*chgUnemp1211[i] + b.2*avgUnemp12[i] + b.3*chgInc1211[i]+ b.4*inc12[i] + b.5*avgGas[i] + b.6*totForcAugOct[i] + b.7*younger30[i]+  b.8*older65[i] + b.9*female[i] + b.10*black[i] + b.11*latino[i] + b.12*noHighSchool[i] + b.13*HighSchool[i] + b.14*someCollege[i] + b.15*fourCollege[i] + b.16*income[i] + b.17*unemployed[i] + b.18*fullTime[i] + b.19*partTime[i] + b.20*ownHome[i] + b.21*newsInt[i] + b.22*ideol[i] + b.23*Dem[i] + b.24*Rep[i] + b.25*Ind[i]
    for (k in 1:(Ncat-1)) { logit(Q[i,k]) <- cut[k] - mu[i]}
    p[i, 1] <- Q[i,1]
    for (k in 2:(Ncat-1)){ p[i,k] <- Q[i,k] - Q[i, (k-1)]}
    p[i, Ncat] <- 1 - Q[i, (Ncat-1)]
  }
  for (j in 1:Ncounty){
    b.county[j] ~ dnorm(mu.county, tau.county)
  }
  mu.county ~ dnorm(0, 0.0001)
  tau.county <- pow(sigma.county, -2)
  sigma.county ~ dunif(0, 1000)
  b.1 ~ dnorm(0, 0.0001)
  b.2 ~ dnorm(0, 0.0001)
  b.3 ~ dnorm(0, 0.0001)
  b.4 ~ dnorm(0, 0.0001)
  b.5 ~ dnorm(0, 0.0001)
  b.6 ~ dnorm(0, 0.0001)
  b.7 ~ dnorm(0, 0.0001)
  b.8 ~ dnorm(0, 0.0001)
  b.9 ~ dnorm(0, 0.0001)
  b.10 ~ dnorm(0, 0.0001)
  b.11 ~ dnorm(0, 0.0001)
  b.12 ~ dnorm(0, 0.0001)
  b.13 ~ dnorm(0, 0.0001)
  b.14 ~ dnorm(0, 0.0001)
  b.15 ~ dnorm(0, 0.0001)
  b.16 ~ dnorm(0, 0.0001)
  b.17 ~ dnorm(0, 0.0001)
  b.18 ~ dnorm(0, 0.0001)
  b.19 ~ dnorm(0, 0.0001)
  b.20 ~ dnorm(0, 0.0001)
  b.21 ~ dnorm(0, 0.0001)
  b.22 ~ dnorm(0, 0.0001)
  b.23 ~ dnorm(0, 0.0001)
  b.24 ~ dnorm(0, 0.0001)
  b.25 ~ dnorm(0, 0.0001)
  
  
    for (k in 1: (Ncat-1)){
      cut[k] ~ dt(0, 1, 5)
    }
}